2.17.3 [5] <2.7> For each instruction in the table above, find the shortest
sequence of MIPS instructions that performs the same operation.
For these problems, the table holds MIPS assembly code fragments. You will be
asked to evaluate each of the code fragments, familiarizing you with the different
MIPS branch instructions.
a. LOOP: addi $s2, $s2, 2
subi $t1, $t1, 1
bne $t1, $0, LOOP
DONE:
b. LOOP: slt $t2, $0, $t1
beq $t2, $0, DONE
subi $t1, $t1, 1
addi $s2, $s2, 2
j LOOP
DONE:
 
 
View Solution
 
 
 
<< Back Next >>